﻿using System;

namespace common
{
	public class random_helper
	{


		public static int get_random_int() {
			var ran = new Random(DateTime.Now.Millisecond);
			return ran.Next();
		}
		public static int get_random_int(int max_value) {
			var ran = new Random(DateTime.Now.Millisecond);
			return ran.Next(max_value);
		}
		public static int get_random_int(int min_value, int max_value) {
			var s = Guid.NewGuid().ToString();
			var seed = 0;
			foreach (var c in s) {
				int i;
				if (int.TryParse(c.ToString(), out i)) {
					seed += i;
				}
			}
			var ran = new Random(seed);
			var result = ran.Next(min_value, max_value);
			return result;
		}
	}
}
